//
//  TravlesDetailModel.m
//  MemoryTravel
//
//  Created by dllo on 15/12/28.
//  Copyright © 2015年 fcx. All rights reserved.
//

#import "TravlesDetailModel.h"

@implementation TravlesDetailModel

-(void)setValue:(id)value forKey:(NSString *)key{

    [super setValue:value forKey:key];

    if ([key isEqualToString:@"notes"]) {

        NSMutableArray *array = [NSMutableArray array];

        for (NSMutableDictionary *dic in value) {

            TravelsDetailsModel *notes = [[TravelsDetailsModel alloc] init];

            [notes setValuesForKeysWithDictionary:dic];

            [array addObject:notes];
        }

        self.notes = [NSMutableArray arrayWithArray:array];
    }
}
@end
